const { DataTypes, Model, Deferrable } = require("sequelize");
const sequelize = require("../../sequelize");
/**
 * 用户拥有的优惠劵模型
 */
class DistributionSetting extends Model {

};
DistributionSetting.init({
    id:{
        type:DataTypes.INTEGER,
        primaryKey: true,
        autoIncrement: true
    },
    distribution_open:{
        type:DataTypes.TINYINT,
        allowNull: false,
    },
    store_first_rebate:{
        type:DataTypes.INTEGER,
        allowNull: false,
    },
    store_second_rebate:{
        type:DataTypes.INTEGER,
        allowNull: false,
    },
    spread_banners:{
        type:DataTypes.TEXT,
        allowNull: false,
    },
    is_self_brokerage:{
        type:DataTypes.TINYINT,
        allowNull: false,
    },
    settlement_days:{
        type:DataTypes.INTEGER,
        allowNull: false,
    },
    brokerage_method:{
        type:DataTypes.STRING,
        allowNull: false,
    }
}, {
    sequelize,
    timestamps:false,
    modelName: "DistributionSetting",
    tableName: "distribution_setting",
})
module.exports = DistributionSetting